<template>
  <view>
    <view class="special-work-list__item">
      <text class="special-work-list__label">作业范围：</text>
      <text class="special-work-list__value">{{ detail.workArea }}</text>
    </view>
    <view class="special-work-list__item">
      <text class="special-work-list__label">作业方式：</text>
      <text class="special-work-list__value">{{ detail.workPattern }}</text>
    </view>
    <view class="special-work-list__item">
      <text class="special-work-list__label">作业深度(m)：</text>
      <text class="special-work-list__value">{{ detail.workDepth }}</text>
    </view>
    <view class="special-work-list__item">
      <text class="special-work-list__label">作业面积(㎡)：</text>
      <text class="special-work-list__value">{{ detail.workAcreage }}</text>
    </view>
    <view class="special-work-list__item flex-col">
      <text class="special-work-list__label">作业简图：</text>
      <image
        v-if="detail.image"
        :src="`${staticUrl}${detail.image}`"
        mode="aspectFill"
        class="special-work__img"
        @click="handlePreviewImage(`${staticUrl}${detail.image}`)"
      ></image>
    </view>
    <view class="special-work-list__item">
      <text class="special-work-list__label">作业实施时间：</text>
      <text class="special-work-list__value">
        {{ actualDateLabel }}
      </text>
    </view>
  </view>
</template>

<script>
import { staticUrl } from '@/config.js'
export default {
  props: {
    detail: {
      type: Object,
      default: () => ({})
    },
    ticket: {
      type: Object,
      default: () => ({})
    },
    inspect: {
      type: Object,
      default: () => ({})
    },
    actualDateLabel: String
  },
  data() {
    return {
      staticUrl
    }
  },
  methods: {
    handlePreviewImage(url) {
      uni.previewImage({
        urls: [url]
      })
    }
  }
}
</script>

<style scoped lang="scss">
@import '../style/style.scss';
</style>
